﻿package stfei.HorizList.Obj
{
    /**
    * ...
    * 解析新闻XML文件数据返回数组-接口实现
    */
    import stfei.HorizList.core.IparseXml
    import flash.xml.XMLNode;
    public class newsXml implements IparseXml
    {
        private var newArray:Array
        public function getArray(xmlObj:XMLNode):Array
        {
            newArray = []
            var inset:Array = xmlObj.childNodes;
            var dataLen:Number = inset.length;
            //总数
            //循环将值写入数组
            for (var i:Number = 0; i < dataLen; i++)
            {
                newArray[i] = new Array();
                newArray[i][0] = inset[i].attributes.title;
                newArray[i][1] = inset[i].attributes.url;
                newArray[i][2] = inset[i].attributes.upTime
            }
            return newArray;
        }
    }
}
